<ExtensionModel>
	
	<!-- Extension Points -->
	
	<ExtensionPoint path = "/MonoDevelop/Deployment/ProjectBrowser/ContextMenu/TranslationProject" name="Translation project context menu">
		<ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
	</ExtensionPoint>
	
	<ExtensionPoint path = "/MonoDevelop/Deployment/ProjectBrowser/ContextMenu/Translation" name="Translation context menu">
		<ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
	</ExtensionPoint>

	<ExtensionPoint path = "/MonoDevelop/Gettext/FileScanners" name="File scanners">
		<ExtensionNode name="Scanner" />
		<ExtensionNode name="RegexScanner" type="MonoDevelop.Gettext.ExtensionNodes.RegexScannerExtensionNode" />
		<ExtensionNode name="XmlRegexScanner" type="MonoDevelop.Gettext.ExtensionNodes.XmlRegexScannerExtensionNode" />
	</ExtensionPoint>
	
	<!-- Extensions -->

	<Extension path = "/MonoDevelop/Core/Applications">
		<Application id = "gettext-update" class = "MonoDevelop.Gettext.GettextTool" description = "Gettext update tool"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/Commands">
		<Command id   = "MonoDevelop.Gettext.Commands.AddTranslation"
		         icon = "md-gettext-locale"
		         _label = "_Add Translation..."
			     _description = "Add another translation (language) for a solution or project" />
		<Command id   = "MonoDevelop.Gettext.Commands.UpdateTranslations"
		         _label = "U_pdate Translations"
		         _description = "Updates all translation files." />
		<Command id   = "MonoDevelop.Gettext.Commands.UpdateTranslation"
		         _label = "_Update Translation"
		         _description = "Updates this translation." />
		<Command id           = "MonoDevelop.Gettext.Commands.ScanForTranslations"
		         type         = "check"
		         _label       = "_Scan for Translations"
		         _description = "Include this file in the translations scan." />
	</Extension>
	
	<Extension path = "/MonoDevelop/Core/StockIcons">
		<StockIcon stockid = "md-gettext-locale" resource = "locale-16.png" size = "Menu" />
		<StockIcon stockid = "md-gettext-project" resource = "project-locale-16.png" size = "Menu" />
		<StockIcon stockid = "md-po-file" resource = "file-locale-16.png" size = "Menu" />
		<StockIcon stockid = "md-po-file" resource = "file-locale-32.png" size = "Dnd" />
		<StockIcon stockid = "md-locale-project" resource = "locale-project.png" size = "Dnd" />
	</Extension>
	
	<Extension path = "/MonoDevelop/Core/MimeTypes">
		<MimeType id="text/x-gettext-translation" icon="md-po-file" isText="true">
			<File pattern="*.po" />
		</MimeType>
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/FileFilters">
		<FileFilter id = "PoFiles" _label = "PO Files" extensions = "*.po"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
		<DataType class = "MonoDevelop.Gettext.TranslationProject" />
		<DataType class = "MonoDevelop.Gettext.TranslationProjectConfiguration" />
	</Extension>

	<Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad">
		<Condition id="ItemType" value="MonoDevelop.Gettext.Translation">
			<CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.Open" insertafter="ActionsSectionEnd" />
			<CommandItem id = "MonoDevelop.Gettext.Commands.UpdateTranslation" />
		</Condition>
		<Condition id="ItemType" value="MonoDevelop.Gettext.TranslationProject">
			<CommandItem id = "MonoDevelop.Gettext.Commands.UpdateTranslations" />
			<CommandItem id = "MonoDevelop.Gettext.Commands.AddTranslation"/>
		</Condition>
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/QuickProperties">
		<Condition id="ItemType" value="ProjectFile">
			<CommandItem id = "MonoDevelop.Gettext.Commands.ScanForTranslations"
		             insertafter = "MonoDevelop.Autotools.Commands.SynchWithMakefile" />
		</Condition>
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/ProjectTemplates">
		<ProjectTemplate id = "MonoDevelop.Gettext.TranslationProject" resource = "TranslationProject.xpt.xml" />
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/TemplateImages">
		<Image id = "md-locale-project" resource = "locale-sidebar.png" />
	</Extension>
	
	<Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
		<NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.TranslationProjectNodeBuilder"/>
		<NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.TranslationNodeBuilder"/>
		<NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.ProjectFileNodeBuilderExtension"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders">
		<Class class = "MonoDevelop.Gettext.PropertyProvider"/>
	</Extension>

	<Extension path = "/MonoDevelop/Autotools/MakefileHandlers">
		<Class class = "MonoDevelop.Gettext.MakefileHandler"/>
	</Extension>
	
	<Extension path = "/MonoDevelop/Gettext/FileScanners">
		<XmlRegexScanner extension="glade">
			<Include regex='translatable\s*=\s*"yes"\s*&gt;([^&lt;]*)&lt;' escapeMode="Xml" />
		</XmlRegexScanner>
		<XmlRegexScanner extension="xml" mimeType="application/xml">
			<Include regex='\s_[-A-Za-z0-9._:]+\s*=\s*"([^"]+)"' escapeMode="Xml" />
			<Include regex="&lt;_[^&gt;]+&gt;(?:&lt;!\[CDATA\[)?((?:.|\n)*?)(?:\]\]&gt;)?&lt;/_[^&gt;]+&gt;" escapeMode="Xml" />
		</XmlRegexScanner>
		<RegexScanner extension="vb">
			<Exclude regex='".*?[^"]"(?!")' />   <!-- Strings-->
			<Exclude regex="'(?:(?!').)*" />     <!-- Line comments -->
			<Include regex='GetString\s*\(\s*"(.*?[^\\])"' />
			<Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"' plural="true"/>
			<Transform regex='""' value='"' />
		</RegexScanner>
		<RegexScanner extension="boo">
			<Exclude regex='".*?"' />               <!-- Strings -->
			<Exclude regex="'.*?'" />               <!-- Strings -->
			<Exclude regex='"""(?:.|\n)*?"""' />    <!-- Strings -->
			<Exclude regex='//(?:(?!//).)*' />      <!-- Line comments -->
			<Exclude regex='/\*(?:.|\n)*?\*/' />    <!-- Block comments -->
			<Include regex='GetString\s*\(\s*"(.*?[^\\])"' />
			<Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"' plural="true"/>
		</RegexScanner>
		<RegexScanner extension="cs">
			<Exclude regex='@".*?"' />	                  <!-- Strings starting with @ -->
			<Exclude regex='(?&lt;!@)".*?(?&lt;!\\)"' />  <!-- Strings-->
			<Exclude regex='//(?:(?!//).)*' />            <!-- Line comments -->
			<Exclude regex='/\*(?:.|\n)*?\*/' />          <!-- Block comments -->
			<Exclude regex='ResourceManager\.GetString' />
			
			<Include regex='\[\s*LocalizedDisplayName?\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='\[\s*LocalizedDescription\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='\[\s*LocalizedCategory\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>

			<!-- Regular string -->
			<Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharp"/>
			<!-- Verbatim string -->
			<Include regex='GetString\s*\(\s*@"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
			<Include regex='GetPluralString\s*\(\s*@"(.*?[^\\])"\s*,\s*@"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
			<Transform regex='([^\\])"\s*\+\s*"' value='$1' regexOptions="Singleline"/><!-- strip out "+" concatenations -->
			
			<Include regex='\[\s*IssueDescription\s*\(\s*"(.*?[^\\])".*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='\[\s*ContextAction\s*\(\s*"(.*?[^\\])".*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='TranslateString\s*\(\s*"(.*?[^\\])"\s*[\)]' regexOptions="Singleline" escapeMode="CSharp"/>
		</RegexScanner>
		<RegexScanner extension="fs">
			<Exclude regex='@".*?"' />	                  <!-- Strings starting with @ -->
			<Exclude regex='(?&lt;!@)".*?(?&lt;!\\)"' />  <!-- Strings-->
			<Exclude regex='//(?:(?!//).)*' />            <!-- Line comments -->
			<Exclude regex='(\*(?:.|\n)*?\*)' />          <!-- Block comments -->
			<Exclude regex='ResourceManager\.GetString' />

			<Include regex='\[&lt;\s*LocalizedDisplayName?\s*\(\s*"(.*?[^\\])"\s*\)\s*&gt;\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='\[&lt;\s*LocalizedDescription\s*\(\s*"(.*?[^\\])"\s*\)\s*&gt;\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='\[&lt;\s*LocalizedCategory\s*\(\s*"(.*?[^\\])"\s*\)\s*&gt;\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<!-- Regular string -->
			<Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharp"/>
			<!-- Verbatim string -->
			<Include regex='GetString\s*\(\s*@"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
			<Include regex='GetPluralString\s*\(\s*@"(.*?[^\\])"\s*,\s*@"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
			<!-- Triple quoted string -->
			<Include regex='GetString\s*\(\s*"""(.*?[^\\])"""\s*[,\)]' regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
			<Include regex='GetPluralString\s*\(\s*"""(.*?[^\\])"""\s*,\s*@"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
			<Transform regex='([^\\])"\s*\+\s*"' value='$1' regexOptions="Singleline"/><!-- strip out "+" concatenations -->
			
			<Include regex='\[&lt;\s*IssueDescription\s*\(\s*"(.*?[^\\])".*\)\s*&gt;\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='\[&lt;\s*ContextAction\s*\(\s*"(.*?[^\\])".*\)\s*&gt;\]' regexOptions="Singleline" escapeMode="CSharp"/>
			<Include regex='TranslateString\s*\(\s*"(.*?[^\\])"\s*[\)]' regexOptions="Singleline" escapeMode="CSharp"/>
		</RegexScanner>
	</Extension>
</ExtensionModel>
